<?php
require_once 'modules/content/models/Content.php';
require_once 'modules/content/models/ContentCategory.php';
require_once 'modules/language/models/Lang.php';
require_once 'modules/product/models/Product.php';
require_once 'modules/product/models/ProductCategory.php';
class front_headerSticker extends Nine_Sticker
{
	public function run()
	{
		$objContent = new Models_Content();
        $objLang    = new Models_Lang();
        $objCat     = new Models_ContentCategory();
        $objProductCategory = new Models_ProductCategory();
        $allContent = $objCat->setAllLanguages(true)->getCategoryWithParentId(27);
        $allContent = @current($allContent);
		$this->view->hopdong = Nine_Route::_("content/index/hopdong/id/29",array('alias' => $allContent['alias']));
		
		$condition = array();
        $condition['content_category_gid'] = 35;
        $allContent = $objContent->setAllLanguages(true)->getAllContent($condition);
        $allContent = @current($allContent);
		$this->view->gioithieu = Nine_Route::_("content/index/gioithieu/id/".$allContent['content_gid'],array('alias' => $allContent['alias']));
		
		$materials = $objContent->setAllLanguages(true)->getContentById(229);
		$this->view->materials = Nine_Route::_("content/index/detail/id/".$materials['content_gid'],array('alias' => $materials['alias']));
		
		$allcat = $objProductCategory->getAllCategories();
		$allcat = current($allcat);
        $this->view->shop = Nine_Route::_("product/index/index/cid/".$allcat['product_category_gid'],array('alias' => $allcat['alias']));
	}
}